package com.demo.service;

import com.demo.mapper.UserMapper;
import com.demo.pojo.User;
import com.mybatis.sqlsession.SqlSession;
import com.myspringmvc.annotation.bean.Service;
import com.util.log.Logger;

import java.util.List;

@Service
public class UserService {
    private static final Logger log = Logger.getLogger(UserService.class);

    private UserMapper userMapper = new SqlSession().getMapper(UserMapper.class);

    public List<User> getUsers(int pageNum, int pageSize) {
        List<User> list = userMapper.getUsers(pageNum, pageSize);
        log.info("获取用户：" + list);
        return list;
    }

}
